<template>
  <div class="modal fade" ref="modinfodiv" id="modinfodiv">
    <div class="modal-dialog modal-dialog-centered" :class="[vdata.onpc?'modal-lg':'']">
      <!-- <div class="modal-content" style="background:DarkSlateGray">
        <div class="modal-header">
          <h4 class="modal-title">模态框头部</h4>
          <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>
        <div class="modal-body">
          <chat ref="chat" v-show="vdata.modinfoname == 'chat'"></chat>
          <offline ref="offline" v-show="vdata.modinfoname == 'offline'"></offline>
          <fly ref="fly" v-show="vdata.modinfoname == 'fly'"></fly>
          <score ref="score" v-show="vdata.modinfoname == 'score'"></score>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
        </div>
      </div> -->
      <div class="modal-content container-fluid m-0 p-1" style="background:LightSlateGray">
        <!-- <button type="button" v-show="vdata.modinfoname == 'skills'" class="btn btn-secondary" data-dismiss="modal">关闭</button> -->

        <equip ref="equip" v-show="vdata.modinfoname == 'equip'"></equip>
      </div>
    </div>
  </div>
</template>

<script>
/* eslint-disable comma-dangle */

import equip from './modinfo/Equip.vue'

export default {
  data: function () {
    return {
      vdata: this.gdata.data
    }
  },
  components: {
    equip: equip,
  },
  methods: {
    vdom: function () {
      // eslint-disable-next-line no-undef
      return $('#modinfodiv')
    },
    vshow: function () {
      this.vdom().modal('show')
    },
    vclose: function () {
      this.vdom().modal('hide')
    },
    isshow: function () {
      return this.vdom().css('display') === 'block'
    },
    onkeyevent: function (key) {
      if (!this.isshow()) { return }
      switch (this.vdata.modinfoname) {
        default: break
      }
    }
  }
}
</script>

<style scoped>
</style>
